using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace HamcoWcs.Entitys.PconInfos
{
    public class PconInfoConfig : IEntityTypeConfiguration<PconInfo>
    {
        public void Configure(EntityTypeBuilder<PconInfo> builder)
        {
            builder.HasComment("输送机信息表");
            builder.Property(x => x.PconName).IsRequired().HasMaxLength(30).HasComment("输送机名");
            builder.Property(x => x.MachineName).HasDefaultValue("").HasMaxLength(50).HasComment("机器名");
            builder.Property(x => x.PortName).HasDefaultValue("").HasMaxLength(50).HasComment("端口名");

            builder.Property(x => x.PlcName).IsRequired().HasMaxLength(30).HasComment("PLC名");
            builder.Property(x => x.PconType).HasComment("输送机类型：0非交互点，1交互点,2port_in,3port_out,4buffer位");
            builder.Property(x => x.SendStartPoint).HasComment("发送DB偏移量");
            builder.Property(x => x.RecvStartPoint).HasComment("接收DB偏移量");
        }
    }
}